
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>4.2.5 命令&参数：import · 大数据 Azkaban 课堂笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content=" 李振超">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism-solarizedlight.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-change_girls/girls.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="426-ming-4ee426-can-shu-ff1a-export.html" />
    
    
    <link rel="prev" href="424-gong-yong-can-shu-ff1a-hive.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.atguigu.com/" target="_blank" class="custom-link">联系我们</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    第 1 章 Sqoop 简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../chapter1.html">
            
                <a href="../../chapter1.html">
            
                    
                    第 2 章 Sqoop 安装和配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li.html">
            
                <a href="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li.html">
            
                    
                    第 3 章 Sqoop 简单使用案例
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li/31-dao-ru-shu-ju.html">
            
                <a href="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li/31-dao-ru-shu-ju.html">
            
                    
                    3.1 导入数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li/32-dao-chu-shu-ju.html">
            
                <a href="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li/32-dao-chu-shu-ju.html">
            
                    
                    3.2 导出数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li/33-jiao-ben-da-bao.html">
            
                <a href="../../di-3-zhang-sqoop-jian-dan-shi-yong-an-li/33-jiao-ben-da-bao.html">
            
                    
                    3.3 脚本打包
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../di-4-zhang-sqoop-de-yi-xie-chang-yong-he-can-shu.html">
            
                <a href="../../di-4-zhang-sqoop-de-yi-xie-chang-yong-he-can-shu.html">
            
                    
                    第 4 章 Sqoop 的一些常用命令和参数
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../41-chang-yong-ming-ling-lie-ju.html">
            
                <a href="../41-chang-yong-ming-ling-lie-ju.html">
            
                    
                    4.1 常用命令列举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../42-ming-ling-he-can-shu-xiang-jie.html">
            
                <a href="../42-ming-ling-he-can-shu-xiang-jie.html">
            
                    
                    4.2 命令和参数详解
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.1" data-path="421-gong-yong-can-shu-ff1a-shu-ju-ku-lian-jie.html">
            
                <a href="421-gong-yong-can-shu-ff1a-shu-ju-ku-lian-jie.html">
            
                    
                    4.2.1 公用参数：数据库连接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.2" data-path="422-gong-yong-can-shu-ff1a-import.html">
            
                <a href="422-gong-yong-can-shu-ff1a-import.html">
            
                    
                    4.2.2 公用参数：import
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.3" data-path="423-gong-yong-can-shu-ff1a-export.html">
            
                <a href="423-gong-yong-can-shu-ff1a-export.html">
            
                    
                    4.2.3 公用参数：export
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.4" data-path="424-gong-yong-can-shu-ff1a-hive.html">
            
                <a href="424-gong-yong-can-shu-ff1a-hive.html">
            
                    
                    4.2.4 公用参数：hive
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.2.5" data-path="425-ming-4ee426-can-shu-ff1a-import.html">
            
                <a href="425-ming-4ee426-can-shu-ff1a-import.html">
            
                    
                    4.2.5 命令&参数：import
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.6" data-path="426-ming-4ee426-can-shu-ff1a-export.html">
            
                <a href="426-ming-4ee426-can-shu-ff1a-export.html">
            
                    
                    4.2.6 命令&参数：export
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.7" data-path="427-ming-4ee426-can-shu-ff1a-codegen.html">
            
                <a href="427-ming-4ee426-can-shu-ff1a-codegen.html">
            
                    
                    4.2.7 命令&参数：codegen
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.8" data-path="428-ming-4ee426-can-shu-ff1a-create-hive-table.html">
            
                <a href="428-ming-4ee426-can-shu-ff1a-create-hive-table.html">
            
                    
                    4.2.8 命令&参数：create-hive-table
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.9" data-path="429-ming-4ee426-can-shu-ff1a-eval.html">
            
                <a href="429-ming-4ee426-can-shu-ff1a-eval.html">
            
                    
                    4.2.9 命令&参数：eval
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.10" data-path="4210.html">
            
                <a href="4210.html">
            
                    
                    4.2.10 命令&参数：import-all-tables
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.11" data-path="4211-ming-4ee426-can-shu-ff1a-job.html">
            
                <a href="4211-ming-4ee426-can-shu-ff1a-job.html">
            
                    
                    4.2.11 命令&参数：job
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.12" data-path="4212.html">
            
                <a href="4212.html">
            
                    
                    4.2.12 命令&参数：list-databases
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.13" data-path="4213-jiang-hdfs-zhong-bu-tong-mu-lu-xia-mian-de-shu-ju-he-bing-zai-yi-qi-bing-fang-ru-zhi-ding-mu-lu-zhong.html">
            
                <a href="4213-jiang-hdfs-zhong-bu-tong-mu-lu-xia-mian-de-shu-ju-he-bing-zai-yi-qi-bing-fang-ru-zhi-ding-mu-lu-zhong.html">
            
                    
                    4.2.13 命令&参数：merge
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.14" data-path="4214-ming-4ee426-can-shu-ff1a-metastore.html">
            
                <a href="4214-ming-4ee426-can-shu-ff1a-metastore.html">
            
                    
                    4.2.14 命令&参数：metastore
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >4.2.5 命令&参数：import</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="425-&#x547D;&#x4EE4;&#x53C2;&#x6570;&#xFF1A;import">4.2.5 &#x547D;&#x4EE4;&amp;&#x53C2;&#x6570;&#xFF1A;import</h1>
<p>&#x5C06;&#x5173;&#x7CFB;&#x578B;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x7684;&#x6570;&#x636E;&#x5BFC;&#x5165;&#x5230;HDFS&#xFF08;&#x5305;&#x62EC;Hive&#xFF0C;HBase&#xFF09;&#x4E2D;&#xFF0C;&#x5982;&#x679C;&#x5BFC;&#x5165;&#x7684;&#x662F;Hive&#xFF0C;&#x90A3;&#x4E48;&#x5F53;Hive&#x4E2D;&#x6CA1;&#x6709;&#x5BF9;&#x5E94;&#x8868;&#x65F6;&#xFF0C;&#x5219;&#x81EA;&#x52A8;&#x521B;&#x5EFA;&#x3002;</p>
<blockquote>
<p>&#x5BFC;&#x5165;&#x6570;&#x636E;&#x5230;hive&#x4E2D;</p>
</blockquote>
<pre class="language-"><code class="lang-bash">sqoop <span class="token function">import</span> \
--connect jdbc:mysql://hadoop201:3306/company \
--username root \
--password aaa \
--table staff \
--hive-import
</code></pre>
<blockquote>
<p>&#x5982;&#xFF1A;&#x589E;&#x91CF;&#x5BFC;&#x5165;&#x6570;&#x636E;&#x5230;hive&#x4E2D;&#xFF0C;mode=append</p>
</blockquote>
<pre class="language-"><code class="lang-bash">sqoop <span class="token function">import</span> \
--connect jdbc:mysql://hadoop102:3306/company \
--username root \
--password 000000 \
--table staff \
--num-mappers 1 \
--fields-terminated-by <span class="token string">&quot;\t&quot;</span> \
--target-dir /user/hive/warehouse/staff_hive \
--check-column <span class="token function">id</span> \
--incremental append \
--last-value 3
</code></pre>
<p><my>&#x5C16;&#x53EB;&#x63D0;&#x793A;&#xFF1A;</my>append&#x4E0D;&#x80FD;&#x4E0E;--hive-&#x7B49;&#x53C2;&#x6570;&#x540C;&#x65F6;&#x4F7F;&#x7528;&#xFF08;Append mode for hive imports is not yet supported. Please remove the parameter --append-mode&#xFF09;</p>
<blockquote>
<p>&#x5982;&#xFF1A;&#x589E;&#x91CF;&#x5BFC;&#x5165;&#x6570;&#x636E;&#x5230;hdfs&#x4E2D;&#xFF0C;mode=lastmodified</p>
<pre class="language-"><code class="lang-bash">&#x5148;&#x5728;mysql&#x4E2D;&#x5EFA;&#x8868;&#x5E76;&#x63D2;&#x5165;&#x51E0;&#x6761;&#x6570;&#x636E;&#xFF1A;
mysql<span class="token operator">&gt;</span> create table company.staff_timestamp<span class="token punctuation">(</span>id int<span class="token punctuation">(</span>4<span class="token punctuation">)</span>, name varchar<span class="token punctuation">(</span>255<span class="token punctuation">)</span>, sex varchar<span class="token punctuation">(</span>255<span class="token punctuation">)</span>, last_modified timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP<span class="token punctuation">)</span><span class="token punctuation">;</span>
mysql<span class="token operator">&gt;</span> insert into company.staff_timestamp <span class="token punctuation">(</span>id, name, sex<span class="token punctuation">)</span> values<span class="token punctuation">(</span>1, <span class="token string">&apos;AAA&apos;</span>, <span class="token string">&apos;female&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
mysql<span class="token operator">&gt;</span> insert into company.staff_timestamp <span class="token punctuation">(</span>id, name, sex<span class="token punctuation">)</span> values<span class="token punctuation">(</span>2, <span class="token string">&apos;BBB&apos;</span>, <span class="token string">&apos;female&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
&#x5148;&#x5BFC;&#x5165;&#x4E00;&#x90E8;&#x5206;&#x6570;&#x636E;&#xFF1A;
$ bin/sqoop <span class="token function">import</span> \
--connect jdbc:mysql://hadoop102:3306/company \
--username root \
--password 000000 \
--table staff_timestamp \
--delete-target-dir \
--m 1
&#x518D;&#x589E;&#x91CF;&#x5BFC;&#x5165;&#x4E00;&#x90E8;&#x5206;&#x6570;&#x636E;&#xFF1A;
mysql<span class="token operator">&gt;</span> insert into company.staff_timestamp <span class="token punctuation">(</span>id, name, sex<span class="token punctuation">)</span> values<span class="token punctuation">(</span>3, <span class="token string">&apos;CCC&apos;</span>, <span class="token string">&apos;female&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
$ bin/sqoop <span class="token function">import</span> \
--connect jdbc:mysql://hadoop102:3306/company \
--username root \
--password 000000 \
--table staff_timestamp \
--check-column last_modified \
--incremental lastmodified \
--last-value <span class="token string">&quot;2017-09-28 22:20:38&quot;</span> \
--m 1 \
--append
</code></pre>
</blockquote>
<p>&#x5C16;&#x53EB;&#x63D0;&#x793A;&#xFF1A;&#x4F7F;&#x7528;lastmodified&#x65B9;&#x5F0F;&#x5BFC;&#x5165;&#x6570;&#x636E;&#x8981;&#x6307;&#x5B9A;&#x589E;&#x91CF;&#x6570;&#x636E;&#x662F;&#x8981;--append&#xFF08;&#x8FFD;&#x52A0;&#xFF09;&#x8FD8;&#x662F;&#x8981;--merge-key&#xFF08;&#x5408;&#x5E76;&#xFF09;
&#x5C16;&#x53EB;&#x63D0;&#x793A;&#xFF1A;last-value&#x6307;&#x5B9A;&#x7684;&#x503C;&#x662F;&#x4F1A;&#x5305;&#x542B;&#x4E8E;&#x589E;&#x91CF;&#x5BFC;&#x5165;&#x7684;&#x6570;&#x636E;&#x4E2D;</p>
<blockquote>
<p>&#x53C2;&#x6570;</p>
</blockquote>
<table>
<thead>
<tr>
<th><strong>&#x5E8F;&#x53F7;</strong></th>
<th><strong>&#x53C2;&#x6570;</strong></th>
<th><strong>&#x8BF4;&#x660E;</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><code>--append</code></td>
<td>&#x5C06;&#x6570;&#x636E;&#x8FFD;&#x52A0;&#x5230;HDFS&#x4E2D;&#x5DF2;&#x7ECF;&#x5B58;&#x5728;&#x7684;DataSet&#x4E2D;&#xFF0C;&#x5982;&#x679C;&#x4F7F;&#x7528;&#x8BE5;&#x53C2;&#x6570;&#xFF0C;sqoop&#x4F1A;&#x628A;&#x6570;&#x636E;&#x5148;&#x5BFC;&#x5165;&#x5230;&#x4E34;&#x65F6;&#x6587;&#x4EF6;&#x76EE;&#x5F55;&#xFF0C;&#x518D;&#x5408;&#x5E76;&#x3002;</td>
</tr>
<tr>
<td>2</td>
<td><code>--as-avrodatafile</code></td>
<td>&#x5C06;&#x6570;&#x636E;&#x5BFC;&#x5165;&#x5230;&#x4E00;&#x4E2A;Avro&#x6570;&#x636E;&#x6587;&#x4EF6;&#x4E2D;</td>
</tr>
<tr>
<td>3</td>
<td><code>--as-sequencefile</code></td>
<td>&#x5C06;&#x6570;&#x636E;&#x5BFC;&#x5165;&#x5230;&#x4E00;&#x4E2A;sequence&#x6587;&#x4EF6;&#x4E2D;</td>
</tr>
<tr>
<td>4</td>
<td><code>--as-textfile</code></td>
<td>&#x5C06;&#x6570;&#x636E;&#x5BFC;&#x5165;&#x5230;&#x4E00;&#x4E2A;&#x666E;&#x901A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#x4E2D;</td>
</tr>
<tr>
<td>5</td>
<td><code>--boundary-query <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>statement</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x8FB9;&#x754C;&#x67E5;&#x8BE2;&#xFF0C;&#x5BFC;&#x5165;&#x7684;&#x6570;&#x636E;&#x4E3A;&#x8BE5;&#x53C2;&#x6570;&#x7684;&#x503C;&#xFF08;&#x4E00;&#x6761;sql&#x8BED;&#x53E5;&#xFF09;&#x6240;&#x6267;&#x884C;&#x7684;&#x7ED3;&#x679C;&#x533A;&#x95F4;&#x5185;&#x7684;&#x6570;&#x636E;&#x3002;</td>
</tr>
<tr>
<td>6</td>
<td><code>--columns   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>col1,</span> <span class="token attr-name">col2,</span> <span class="token attr-name">col3</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x6307;&#x5B9A;&#x8981;&#x5BFC;&#x5165;&#x7684;&#x5B57;&#x6BB5;</td>
</tr>
<tr>
<td>7</td>
<td><code>--direct</code></td>
<td>&#x76F4;&#x63A5;&#x5BFC;&#x5165;&#x6A21;&#x5F0F;&#xFF0C;&#x4F7F;&#x7528;&#x7684;&#x662F;&#x5173;&#x7CFB;&#x6570;&#x636E;&#x5E93;&#x81EA;&#x5E26;&#x7684;&#x5BFC;&#x5165;&#x5BFC;&#x51FA;&#x5DE5;&#x5177;&#xFF0C;&#x4EE5;&#x4FBF;&#x52A0;&#x5FEB;&#x5BFC;&#x5165;&#x5BFC;&#x51FA;&#x8FC7;&#x7A0B;&#x3002;</td>
</tr>
<tr>
<td>8</td>
<td><code>--direct-split-size</code></td>
<td>&#x5728;&#x4F7F;&#x7528;&#x4E0A;&#x9762;direct&#x76F4;&#x63A5;&#x5BFC;&#x5165;&#x7684;&#x57FA;&#x7840;&#x4E0A;&#xFF0C;&#x5BF9;&#x5BFC;&#x5165;&#x7684;&#x6D41;&#x6309;&#x5B57;&#x8282;&#x5206;&#x5757;&#xFF0C;&#x5373;&#x8FBE;&#x5230;&#x8BE5;&#x9608;&#x503C;&#x5C31;&#x4EA7;&#x751F;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x6587;&#x4EF6;</td>
</tr>
<tr>
<td>9</td>
<td><code>--inline-lob-limit</code></td>
<td>&#x8BBE;&#x5B9A;&#x5927;&#x5BF9;&#x8C61;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x7684;&#x6700;&#x5927;&#x503C;</td>
</tr>
<tr>
<td>10</td>
<td><code>--m&#x6216;&#x2013;num-mappers</code></td>
<td>&#x542F;&#x52A8;N&#x4E2A;map&#x6765;&#x5E76;&#x884C;&#x5BFC;&#x5165;&#x6570;&#x636E;&#xFF0C;&#x9ED8;&#x8BA4;4&#x4E2A;&#x3002;</td>
</tr>
<tr>
<td>11</td>
<td><code>--query&#x6216;--e <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>statement</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x5C06;&#x67E5;&#x8BE2;&#x7ED3;&#x679C;&#x7684;&#x6570;&#x636E;&#x5BFC;&#x5165;&#xFF0C;&#x4F7F;&#x7528;&#x65F6;&#x5FC5;&#x987B;&#x4F34;&#x968F;&#x53C2;--target-dir&#xFF0C;--hive-table&#xFF0C;&#x5982;&#x679C;&#x67E5;&#x8BE2;&#x4E2D;&#x6709;where&#x6761;&#x4EF6;&#xFF0C;&#x5219;&#x6761;&#x4EF6;&#x540E;&#x5FC5;&#x987B;&#x52A0;&#x4E0A;$CONDITIONS&#x5173;&#x952E;&#x5B57;</td>
</tr>
<tr>
<td>12</td>
<td><code>--split-by   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>column-name</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x6309;&#x7167;&#x67D0;&#x4E00;&#x5217;&#x6765;&#x5207;&#x5206;&#x8868;&#x7684;&#x5DE5;&#x4F5C;&#x5355;&#x5143;&#xFF0C;&#x4E0D;&#x80FD;&#x4E0E;--autoreset-to-one-mapper&#x8FDE;&#x7528;&#xFF08;&#x8BF7;&#x53C2;&#x8003;&#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF09;</td>
</tr>
<tr>
<td>13</td>
<td><code>--table   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>table-name</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x5173;&#x7CFB;&#x6570;&#x636E;&#x5E93;&#x7684;&#x8868;&#x540D;</td>
</tr>
<tr>
<td>14</td>
<td><code>--target-dir   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dir</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x6307;&#x5B9A;HDFS&#x8DEF;&#x5F84;</td>
</tr>
<tr>
<td>15</td>
<td><code>--warehouse-dir   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dir</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x4E0E;14&#x53C2;&#x6570;&#x4E0D;&#x80FD;&#x540C;&#x65F6;&#x4F7F;&#x7528;&#xFF0C;&#x5BFC;&#x5165;&#x6570;&#x636E;&#x5230;HDFS&#x65F6;&#x6307;&#x5B9A;&#x7684;&#x76EE;&#x5F55;</td>
</tr>
<tr>
<td>16</td>
<td><code>--where</code></td>
<td>&#x4ECE;&#x5173;&#x7CFB;&#x6570;&#x636E;&#x5E93;&#x5BFC;&#x5165;&#x6570;&#x636E;&#x65F6;&#x7684;&#x67E5;&#x8BE2;&#x6761;&#x4EF6;</td>
</tr>
<tr>
<td>17</td>
<td><code>--z&#x6216;--compress</code></td>
<td>&#x5141;&#x8BB8;&#x538B;&#x7F29;</td>
</tr>
<tr>
<td>18</td>
<td><code>--compression-codec</code></td>
<td>&#x6307;&#x5B9A;hadoop&#x538B;&#x7F29;&#x7F16;&#x7801;&#x7C7B;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;gzip(Use Hadoop codec default gzip)</td>
</tr>
<tr>
<td>19</td>
<td><code>--null-string   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>null-string</span><span class="token punctuation">&gt;</span></span></code></td>
<td>string&#x7C7B;&#x578B;&#x7684;&#x5217;&#x5982;&#x679C;null&#xFF0C;&#x66FF;&#x6362;&#x4E3A;&#x6307;&#x5B9A;&#x5B57;&#x7B26;&#x4E32;</td>
</tr>
<tr>
<td>20</td>
<td><code>--null-non-string   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>null-string</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x975E;string&#x7C7B;&#x578B;&#x7684;&#x5217;&#x5982;&#x679C;null&#xFF0C;&#x66FF;&#x6362;&#x4E3A;&#x6307;&#x5B9A;&#x5B57;&#x7B26;&#x4E32;</td>
</tr>
<tr>
<td>21</td>
<td><code>--check-column   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>col</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x4F5C;&#x4E3A;&#x589E;&#x91CF;&#x5BFC;&#x5165;&#x5224;&#x65AD;&#x7684;&#x5217;&#x540D;</td>
</tr>
<tr>
<td>22</td>
<td><code>--incremental   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mode</span><span class="token punctuation">&gt;</span></span></code></td>
<td>mode&#xFF1A;append&#x6216;lastmodified</td>
</tr>
<tr>
<td>23</td>
<td><code>--last-value   <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>value</span><span class="token punctuation">&gt;</span></span></code></td>
<td>&#x6307;&#x5B9A;&#x67D0;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x7528;&#x4E8E;&#x6807;&#x8BB0;&#x589E;&#x91CF;&#x5BFC;&#x5165;&#x7684;&#x4F4D;&#x7F6E;</td>
</tr>
</tbody>
</table>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; &#x5C1A;&#x7845;&#x8C37;&#x5927;&#x6570;&#x636E; 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification"><br>&#x8BE5;&#x6587;&#x4EF6;&#x6700;&#x540E;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2018-11-20 18:13:47
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="424-gong-yong-can-shu-ff1a-hive.html" class="navigation navigation-prev " aria-label="Previous page: 4.2.4 公用参数：hive">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="426-ming-4ee426-can-shu-ff1a-export.html" class="navigation navigation-next " aria-label="Next page: 4.2.6 命令&参数：export">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"4.2.5 命令&参数：import","level":"1.4.2.5","depth":3,"next":{"title":"4.2.6 命令&参数：export","level":"1.4.2.6","depth":3,"path":"di-4-zhang-sqoop-de-yi-xie-chang-yong-he-can-shu/42-ming-ling-he-can-shu-xiang-jie/426-ming-4ee426-can-shu-ff1a-export.md","ref":"di-4-zhang-sqoop-de-yi-xie-chang-yong-he-can-shu/42-ming-ling-he-can-shu-xiang-jie/426-ming-4ee426-can-shu-ff1a-export.md","articles":[]},"previous":{"title":"4.2.4 公用参数：hive","level":"1.4.2.4","depth":3,"path":"di-4-zhang-sqoop-de-yi-xie-chang-yong-he-can-shu/42-ming-ling-he-can-shu-xiang-jie/424-gong-yong-can-shu-ff1a-hive.md","ref":"di-4-zhang-sqoop-de-yi-xie-chang-yong-he-can-shu/42-ming-ling-he-can-shu-xiang-jie/424-gong-yong-can-shu-ff1a-hive.md","articles":[]},"dir":"ltr"},"config":{"plugins":["splitter","expandable-chapters-small","page-toc-button","-highlight","prism","prism-themes","tbfed-pagefooter","sitemap","change_girls","livereload"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy 尚硅谷大数据 2019","modify_label":"<br>该文件最后修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prismjs/themes/prism-solarizedlight.css"]},"disqus":{"shortName":"zhenchao125"},"livereload":{},"splitter":{},"change_girls":{"time":30,"urls":["http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/62171757.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/83394736.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3394270.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/65028582.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/20359261.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/37472401.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3355397.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/11075549.jpg-atguiguImg"]},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sitemap":{"hostname":"http://bigdataatguigu.applinzi.com/"},"page-toc-button":{"maxTocDepth":3,"minTocSize":2},"prism-themes":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":" 李振超","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"大数据 Azkaban 课堂笔记","language":"zh-hans","links":{"sidebar":{"联系我们":"http://www.atguigu.com/"}},"gitbook":"*","description":"课堂笔记,学生提前预习"},"file":{"path":"di-4-zhang-sqoop-de-yi-xie-chang-yong-he-can-shu/42-ming-ling-he-can-shu-xiang-jie/425-ming-4ee426-can-shu-ff1a-import.md","mtime":"2018-11-20T10:13:47.413Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-03-30T12:30:16.985Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-change_girls/girls.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

